package com.project.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 商品实体
 */
@Data
@NoArgsConstructor
@TableName("t_product")
public class ProductBean {

    @TableId("pk_productId")
    /** 商品id*/
    private Integer id;
    @TableField("p_name")
    /**商品名称*/
    private String name;
    @TableField("p_brand")
    /**商品品牌*/
    private String brand;
    @TableField("p_type")
    /**商品类别*/
    private String type;
    @TableField("p_imgPath")
    /**图片路径*/
    private String imgPath;
    @TableField("p_buyPrice")
    /**最新采购价*/
    private Integer buyPrice = 0;
    @TableField("p_salePrice")
    /**建议销售价*/
    private Integer salePrice = 0;
    @TableField("p_num")
    /**库存数量*/
    private Integer num = 0;

    public ProductBean(Integer id,String name, String brand, String type, String imgPath) {
        this.id = id;
        this.name = name;
        this.brand = brand;
        this.type = type;
        this.imgPath = imgPath;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", brand='" + brand + '\'' +
                ", type='" + type + '\'' +
                ", imgPath='" + imgPath + '\'' +
                ", buyPrice=" + buyPrice +
                ", salePrice=" + salePrice +
                ", num=" + num +
               "}\n";
    }
}
